<div id="main_content">
<ol style="list-style-type:none" id="update" class="timeline">
<?php if(!empty($latest_comments)): ?>
<?php foreach($latest_comments as $komen):?>
<li id="row_<?php echo $komen->id_comment;?>">
<div id="newpost">
	<?php echo '<div class="photo" title="'.$komen->username.'">';?>
	<?php 	if ($komen->avatar == 0 || $komen->avatar == null){
				if ($komen->id_user == $this->session->userdata('id_user')){
					echo anchor('profile',img($def2));
				}else{
					echo anchor('people/view/'.$komen->id_user,img($def2));
				} 
			}else 
				if ($komen->id_user == $this->session->userdata('id_user')){
					echo anchor('profile',img(array('src'=>'img/thumb_foto/'.$komen->filename,'width'=>50,'height'=>50)));
				}else{
					echo anchor('people/view/'.$komen->id_user,img(array('src'=>'img/thumb_foto/'.$komen->filename,'width'=>50,'height'=>50)));
				}
	echo '</div>';
				if ($komen->id_user == $this->session->userdata('id_user')){
					echo '<div class="username"><b>'.anchor('profile',$komen->username).'</b></div>';
					echo '<div class="kotakstatus3"><div class="status2">'.$komen->content;
					echo '</div>';
					echo '<div class="time" title="'.$komen->created.'"></div>';
					echo '<div class="action"><span class="delete_button"><a href="#" del_id="'.$komen->id_comment.'" class="delete_update"><img src="http://localhost/ta/img/delete.gif"/>Delete</a></span></div>';
					echo '</div>';	
					echo '<div class="clear"></div>';
			
				}else{
					echo '<div class="username"><b>'.anchor('people/view/'.$komen->id_user,$komen->username).'</b></div>';
					echo '<div class="kotakstatus3"><div class="status2">'.$komen->content.'</div>';
					echo '<div class="time" title="'.$komen->created.'"></div>';
					echo '</div>';	
					echo '<div class="clear"></div>';
				}					
		?>	
		
</div>
</li>
<?php endforeach;?>
<?php else:?>
<img src="http://localhost/ta/img/fav4.jpg"/>
<?php endif;?>
</ol>
</div>